package com.yanqu.road.server.pb;

import com.yanqu.road.entity.activity.deepfishing.entity.DeepFishingBagItemData;
import com.yanqu.road.pb.activity.DeepFishingProto;

public class DeepFishingPb {
    public static DeepFishingProto.deepFishingItemData.Builder parseDeepFishItemToMsg(DeepFishingBagItemData deepFishingBagItemData){
        DeepFishingProto.deepFishingItemData.Builder builder = DeepFishingProto.deepFishingItemData.newBuilder();
        builder.setObjectId(deepFishingBagItemData.getObjectId());
        builder.setMeter(deepFishingBagItemData.getMeter());
        builder.setOrderId(deepFishingBagItemData.getOrderId());
        builder.setType(deepFishingBagItemData.getType());
        builder.setValue(deepFishingBagItemData.getValue());
        builder.setWeight(deepFishingBagItemData.getWeight());
        return builder;
    }

    public static DeepFishingBagItemData parseMsgToDeepFishBagItem(DeepFishingProto.deepFishingItemData itemDataMsg){
        DeepFishingBagItemData deepFishingBagItemData = new DeepFishingBagItemData();
        deepFishingBagItemData.setObjectId(itemDataMsg.getObjectId());
        deepFishingBagItemData.setMeter(itemDataMsg.getMeter());
        deepFishingBagItemData.setOrderId(itemDataMsg.getOrderId());
        deepFishingBagItemData.setType(itemDataMsg.getType());
        deepFishingBagItemData.setWeight(itemDataMsg.getWeight());
        deepFishingBagItemData.setValue(itemDataMsg.getValue());
        return deepFishingBagItemData;
    }



}
